using DearlerPlatform.Domain;
using DelaerPlatform.Core.Repository;
using Microsoft.AspNetCore.Mvc;

namespace DelaerPlatform.web.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class WeatherForecastController : ControllerBase
    {
        private static readonly string[] Summaries = new[]
        {
            "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
        };

        private readonly ILogger<WeatherForecastController> _logger;
        private readonly IRepository<Customer> customer;

        public WeatherForecastController(ILogger<WeatherForecastController> logger,IRepository<Customer> customer)
        {
            _logger = logger;
            this.customer = customer;
        }

        [HttpGet(Name = "GetWeatherForecast")]
        public async Task<List<Customer>> Get()
        {
            return await customer.GetListAsync(m=>m.Id==1);
        }
    }
}
